import request from '@/config/axios'

export const getRelateEnterInfo = async (params) => {
  return await request.get({
    url: '/relatedEnterprise/getRelateEnterInfo',
    params
  })
}

export const deleteRelevancy = async (id) => {
  return await request.delete({ url: `/relatedEnterprise/delete/${id}` })
}

export const checkUnprocessedSections = async (params) => {
  return await request.get({
    url: '/agreementManage/checkUnprocessedSections',params
  })
}

export const createRelevancy = async (data) => {
  return await request.post({ url: `/relatedEnterprise/create`, data })
}

export const updateRelevancy = (data) => {
  return request.put({ url: '/relatedEnterprise/update', data })
}

export const getTenantList = async () => {
  return await request.get({
    url: '/system/tenant/getTenantList',
  })
}

export const getRelateEnterInfoById = async (id: number) => {
  return await request.get({ url: `/relatedEnterprise/getRelateEnterInfoById/${id}` })
}
